#pragma once

#include "Vehicle.h"

class AdvancedVehicle : public Vehicle
{
public:
	virtual ~AdvancedVehicle() { delete _vehicle; }
	virtual void Run() {}
protected:
	AdvancedVehicle(Vehicle* vehicle) : _vehicle(vehicle) {}

	Vehicle* _vehicle;
private:
};

class Hydroaeroplane : public AdvancedVehicle
{
public:
	Hydroaeroplane(Vehicle* vehicle) : AdvancedVehicle(vehicle) {}
	~Hydroaeroplane() {}
	void Run() { _vehicle->Run(); OtherFeature(); }
	void OtherFeature() { cout << "The hydroaeroplane is  also able to work in the water." << endl; }
protected:
private:
};